Skip to content

ci: add Claude AI review workflow templates#4

Draft
heskew wants to merge 3 commits into
mainfrom
ci/workflow-templates
Draft

ci: add Claude AI review workflow templates#4
heskew wants to merge 3 commits into
mainfrom
ci/workflow-templates

Conversation

@heskew
Copy link
Copy Markdown
Member

@heskew heskew commented May 6, 2026

Summary

Surfaces the four Claude AI workflow callers as suggested workflows in the Actions tab of any HarperFast repo. New-repo onboarding goes from "copy-paste four files from another repo" to "click + customize" in the GitHub UI.

Adoption pattern is identical to what's already running on `HarperFast/harper`, `HarperFast/oauth`, and (post-#122) `HarperFast/harper-pro`: each template is a thin caller of a reusable workflow in `HarperFast/ai-review-prompts`.

Files added

`workflow-templates/` (a new top-level directory — GitHub picks it up automatically for the suggested-workflows feature):

Template Properties What it does
`claude-review.yml` `claude-review.properties.json` Auto-review every PR. Inline findings + concise summary.
`claude-mention.yml` `claude-mention.properties.json` Respond to `@claude …` in PR/issue comments.
`claude-issue-to-pr.yml` `claude-issue-to-pr.properties.json` Label issue with `claude-fix:{typo,docs,deps,bug}` → Claude opens a PR.
`validate-caller-workflows.yml` `validate-caller-workflows.properties.json` Structural lint for the caller files. Catches shadow jobs and mutable refs. Make required on `main`.

Plus `workflow-templates/README.md` with the new-repo onboarding checklist: secrets, labels, `.node-version`, branch protection, `AGENTS.md`/`CLAUDE.md`, customization pointers, and pin-bump guidance.

Pin policy

All four templates pin to the same `ai-review-prompts` SHA (`11872cb…`). Bumping the pin is the only motion needed to adopt upstream updates.

Test plan

  • All four templates dry-run-validate against the structural validator script bundled in `ai-review-prompts`'s `validate-caller-workflow.sh`: clean tree passes; tag/branch refs fail.
  • Properties JSON files are valid (`name`, `description`, `iconName`, `categories`).
  • After merge: open any HarperFast repo → Actions → "New workflow" → confirm the four "Claude …" templates show up under their listed categories.
  • Onboard a fresh repo end-to-end (e.g. `HarperFast/rocksdb-js`) using only the templates + README checklist — confirm the path doesn't require pulling files from other repos.

🤖 Generated with Claude Code

heskew and others added 3 commits May 6, 2026 10:44
Surfaces the four Claude caller workflows as suggested workflows
in any HarperFast repo's Actions tab. New repos pick them up with
two clicks each instead of copy-pasting.

Templates (one YAML + properties.json each):
- claude-review.yml          — auto-review every PR
- claude-mention.yml         — respond to @claude in comments
- claude-issue-to-pr.yml     — claude-fix:* labels → PRs
- validate-caller-workflows.yml — structural lint, required check

Plus workflow-templates/README.md with the new-repo onboarding
checklist (secrets, labels, .node-version, branch protection,
AGENTS.md/CLAUDE.md) and pin-bump guidance.

All four templates pin to the same ai-review-prompts SHA
(11872cb). Adopting consumers can bump in lockstep when an
upstream change ships.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The auth gate mints an installation token from the
\`HarperFast AI Workflows\` GitHub App on every workflow run.
Without the App installed on the consumer repo, the
\`authorize\` job fails with a 401 even when all four secrets
are configured correctly.

Add this as step 1 of the new-repo onboarding checklist (it's
a precondition; the secrets in step 2 are useless without it).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Catches the templates up to what the consumer repos already pin
(harper, oauth, harper-pro all on f6daed30). New repos onboarding
from these templates now get:

- claude-fix:test label support in the issue-to-PR reusable
- FS primitives (mkdir/mv/cp/ls/cat) in mention + issue-to-PR
  allowlists
- add-only migration guidance for :test work

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@heskew heskew marked this pull request as draft May 20, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant